import request from '@/utils/request'

export function getDepts(params) {
  return request({
    url: 'api/manage-aggregation/dept',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: 'api/manage-aggregation/dept',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/manage-aggregation/dept',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/manage-aggregation/dept',
    method: 'put',
    data
  })
}

export function getDeptSuperior(data) {
  return request({
    url: 'api/manage-aggregation/dept',
    method: 'get',
    data
  })
}
// 查询配置
export function getConfig(params) {
  return request({
    url: 'api/manage-aggregation/config/query',
    method: 'get',
    params
  })
}

// 查询单个配置
export function getConfigByid(params) {
  return request({
    url: 'api/manage-aggregation/config/queryById',
    method: 'get',
    params
  })
}
// 新增或者修改
export function getConfigByi(params) {
  return request({
    url: 'api/manage-aggregation/config/queryById',
    method: 'get',
    params
  })
}
export default { add, edit, del, getDepts, getDeptSuperior, getConfig, getConfigByid }
